// Definition of an icon for Mac OS X
// Copyright 2006 (C) Ralph Thomas

#ifndef MISSION_TOOLKIT_MAC_ICON_H
#define MISSION_TOOLKIT_MAC_ICON_H

#include <toolkit/icon.h>
#include "carbon_safe.hpp"

namespace toolkit {
	//
	/// This subclass of icon is always returned by icon::create on
	/// Apple systems. It can return images for various different
	/// icon sizes, and owns the image references.
	//
	class iconMac : public icon {
	  public:
		//
		/// Virtual destructor.
		//
		virtual ~iconMac();
		//
		/// Icons are available in these sizes.
		//
		enum iconSize {
			k16x16 = 0,	///< 16x16 pixel icon.
			k22x22,		///< 22x22 pixel icon.
			k32x32,		///< 32x32 pixel icon.
			k48x48,		///< 48x48 pixel icon.
			k64x64,		///< 64x64 pixel icon.
			k128x128	///< 128x128 pixel icon.
		};
		//
		// CGImageRef get( iconSize size ) const
		//
		/// Return an image reference for this icon. You do not
		/// need to free the returned image -- that is performed
		/// by this class later.
		///
		/// \param	size	the required icon size.
		/// \return	an image containing the requested icon.
		//
		virtual CGImageRef get( iconSize size ) const = 0;
	};
};

#endif
